package com.gamiao.gwt.demo.useSpring.client;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.ServiceDefTarget;

public interface UserService extends RemoteService {

	public static final String SERVICE_URI = "GWTSpring/userService";

	public static class Util {

		public static UserServiceAsync getInstance() {
			UserServiceAsync instance = (UserServiceAsync) GWT
					.create(UserService.class);
			ServiceDefTarget target = (ServiceDefTarget) instance;
			target.setServiceEntryPoint(GWT.getModuleBaseURL() + SERVICE_URI);
			return instance;
		}
	}

	public PersonClient[] findAll();

	public void save(PersonClient personClient);

	public void remove(int id);

	public PersonClient find(int id);

}
